<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>站内信管理</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>站内信管理</h3>
                        <form id="form" name="form" th:action="@{/innerMail/getAll}" th:method="post"
                              th:object="${innerMailForm}">
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span12">
                                    <table style="width:100%" border="0">
                                        <tbody>
                                        <tr>
                                            <th style="width: 70px;">关键字:</th>
                                            <td style="width: auto;">
                                                <input type="text" name="title" id="title" class="input_fix"
                                                       placeholder="根据关键字查询标题或内容" th:value="*{title}" maxlength="50"/>
                                            </td>
                                            <th style="width: 70px;">查看状态:</th>
                                            <td style="width: auto;">
                                                <select th:field="*{isRead}" id="isRead" name="isRead" class="input_fix"
                                                        th:value="*{isRead}">
                                                    <option value="">全部</option>
                                                    <option value="false">未读</option>
                                                    <option value="true">已读</option>
                                                </select>
                                            </td>
                                            <td style="width:120px;">
                                                <button class="btn btn-info" style="float: right;" type="button"
                                                        onclick="pagechange(1);"><i class="fa fa-search"
                                                                                    aria-hidden="true"></i>查询
                                                </button>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td>标题</td>
                                    <td>站内信类型</td>
                                    <td>发送者</td>
                                    <td>查看状态</td>
                                    <td>发送时间</td>
                                    <td style="width:280px;">操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="mail: ${innerMailList}" th:unless="${mail.isRead eq null}">
                                    <td th:text="${mail.title}">1</td>
                                    <td th:text="${mail.type.text}">1</td>
                                    <td th:text="${mail.fromUserName}">123</td>
                                    <td th:text="${mail.isRead eq false ? '未读' : '已读'}">123</td>
                                    <td th:text="${#dates.format(mail.sendTime, 'yyyy年MM月dd日 HH:mm:ss')}">123</td>
                                    <td>
                                        <a shiro:hasPermission="/innerMail/view" href="#"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/innerMail/detail?id=' + ${mail.id}}" th:text="查看详情">查看详情</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="6">
                                        <div class="row-fluid" th:replace="common/page"/>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>
<div th:replace="common/layer"/>
</body>
</html>
